<template>
    <div class="city">
        <city-header></city-header>
        <city-list :cities="cities"
        :hotCities="hotCities"></city-list>
    </div>
</template>
<script>
import CityHeader from "./pages/header"
import CityList from "./pages/List"
export default {
    components:{
        CityHeader,
        CityList
    },
    data(){
        return{
            hotCities:[],
            cities:{}
        }
    },
    mounted(){
        this.$http.get("/api/city.json")
        .then((res)=>{
            // console.log(res.data.data[0].hotCities);
            let data=res.data.data;
            this.hotCities=data[0].hotCities
            // console.log(res.data.data[0].cities.A);
            this.cities=data[0].cities
        })
    }
}
</script>
<style scoped>
.city{
    background: #f5f5f5;
}

</style>